<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>登录</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/layui/css/layui.css">
</head>
<body>
<form class="layui-form layui-form-pane" method="post" id="loginform" action="${pageContext.request.contextPath}/home/login">
  <div class="layui-form-item">
    <label class="layui-form-label">用户名</label>
    <div class="layui-input-inline">
      <input type="text" name="username" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
    </div>
  </div>
   <div class="layui-form-item">
    <label class="layui-form-label">密码</label>
    <div class="layui-input-inline">
      <input type="text" name="password" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
    </div>
  </div>
  
  <div class="layui-form-item">
    <label class="layui-form-label">角色</label>
    <div class="layui-input-inline">
      <select name="usertype">
        <option value="">请选择</option>
        <option value="1">门诊管理员</option>
        <option value="2">医生管理员</option>
      </select>
    </div>
  </div>
    <div class="layui-form-item">
    <button class="layui-btn" lay-submit="" lay-filter="login">登录</button> 
    <p>${errorMessage}</p>
   </div>
</form>
<script src="${pageContext.request.contextPath}/static/layui/layui.js"></script>
<script>
layui.use(['form', 'layedit', 'laydate','jquery'], function(){
  var form = layui.form
  ,layer = layui.layer
  ,layedit = layui.layedit
  ,laydate = layui.laydate;
  
  //提交表单
  form.on("submit(login)",function(data){
	  $("#loginform").submit();
  })
});
</script>
</body>
</html>